package edu.nyu.msis.ds;

import java.util.HashMap;

public class DefList {
	Integer size;
	HashMap<String, Integer> definedVars;

	/**
	 * Default Constructor 
	 */
	public DefList() {
		super();
		this.size = 0;
		this.definedVars = new HashMap<String, Integer>();
	}

	/**
	 * @param size
	 * @param definedVars
	 */
	public DefList(Integer size, HashMap<String, Integer> definedVars) {
		super();
		this.size = size;
		this.definedVars = definedVars;
	}

	/**
	 * @return the size
	 */
	public Integer getSize() {
		return size;
	}

	/**
	 * @param size the size to set
	 */
	public void setSize(Integer size) {
		this.size = size;
	}

	/**
	 * @return the definedVars
	 */
	public HashMap<String, Integer> getDefinedVars() {
		return definedVars;
	}

	/**
	 * @param definedVars the definedVars to set
	 */
	public void setDefinedVars(HashMap<String, Integer> definedVars) {
		this.definedVars = definedVars;
	}

	public void addToDefinedVars (String variable, Integer address) {
		if (!variable.equals("")) {
			definedVars.put(variable, address);
		}
	}
}